/*
 * @Author: yangfan 1437446666@qq.com
 * @Date: 2023-02-28 10:49:33
 * @LastEditors: yangfan 1437446666@qq.com
 * @LastEditTime: 2023-03-02 16:34:00
 * @FilePath: \s_2006A_shixun\src\router\userRouter.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default [
  //编辑
  {
    path: '/home',
    name: 'home',
    meta: {
      auth: ['visitor']
    },
    component: () => import('@/views/home.vue'),
    children: [
      {
        path: '/home',
        meta: {
          auth: ['visitor']
        },
        redirect: '/home/Work'
      },
      {
        //工作台
        path: '/home/Work',
        meta: {
          auth: ['visitor'],
          crumbs: ['工作台']
        },
        name: 'Work',
        component: () => import('@/views/Staging.vue')
      },
      // {
      //   //个人中心
      //   path: 'Personal',
      //   meta: {
      //     auth: ['visitor']
      //   },
      //   name: 'Personal',
      //   component: () => import('')
      // },
      {
        //所有文章
        path: '/home/allArticles',
        name: 'allArticles',
        meta: {
          auth: ['visitor'],
          crumbs: ['文章管理']
        },
        children: [
          {
            //所有文章
            path: '/home/allArticles',
            name: 'allArticles',
            meta: {
              crumbs: ['文章管理', '所有文章'],
              auth: ['visitor'],
              name: '所有文章'
            },
            id: '15',
            component: () => import('@/views/TwoStage/AllArticles.vue')
          },
          {
            //分类管理
            path: '/home/allArticle/classifyAdmin',
            name: 'classifyAdmin',
            meta: {
              crumbs: ['文章管理', '分类管理'],
              auth: ['visitor']
            },
            id: '16',
            component: () =>
              import('@/views/TwoStage/ClassificationManagement.vue')
          },
          {
            //标签管理
            path: '/home/allArticle/labelAdmin',

            name: 'labelAdmin',
            meta: {
              crumbs: ['文章管理', '标签管理'],
              auth: ['visitor']
            },
            id: '17',
            component: () => import('@/views/TwoStage/LabelManagement.vue')
          }
        ]
      },
      {
        //页面管理
        path: '/home/pageAdmin',

        name: 'pageAdmin',
        meta: {
          crumbs: ['页面管理'],
          auth: ['visitor']
        },
        component: () => import('@/views/Page.vue')
      },
      {
        //知识小册
        path: '/home/Knowledge',

        name: 'Knowledge',
        meta: {
          crumbs: ['知识小册'],
          auth: ['visitor']
        },
        component: () => import('@/views/KnowledgeBooklet.vue')
      },
      {
        //海报管理
        path: '/home/Poster',

        name: 'Poster',
        meta: {
          crumbs: ['海报管理'],
          auth: ['visitor']
        },
        component: () => import('@/views/Poster.vue')
      },
      {
        //评论管理
        path: '/home/Comment',

        name: 'Comment',
        meta: {
          crumbs: ['评论管理'],
          auth: ['visitor']
        },
        component: () => import('@/views/Comment.vue')
      },
      {
        //邮件管理
        path: '/home/emailAdmin',

        name: 'emailAdmin',
        meta: {
          crumbs: ['邮件管理'],
          auth: ['visitor']
        },
        component: () => import('@/views/Mail.vue')
      },
      //文件管理
      {
        path: '/home/fileAdmin',

        name: 'fileAdmin',
        meta: {
          crumbs: ['文件管理'],
          auth: ['visitor']
        },
        component: () => import('@/views/FileManagement.vue')
      },
      //搜素记录
      {
        path: '/home/searchHistory',

        name: 'searchHistory',
        meta: {
          crumbs: ['搜素记录'],
          auth: ['visitor']
        },
        component: () => import('@/views/SearchSecords.vue')
      },
      //访问统计
      {
        path: '/home/Visit',

        name: 'Visit',
        meta: {
          crumbs: ['访问统计'],
          auth: ['visitor']
        },
        component: () => import('@/views/AccessStatistics.vue')
      },
      //用户管理
      {
        path: '/home/userAdmin',

        name: 'userAdmin',
        meta: {
          crumbs: ['用户管理'],
          auth: ['visitor', '管理员']
        },
        component: () => import('@/views/UserManagement.vue')
      },
      //系统设置
      {
        path: '/home/Set',

        name: 'Set',
        meta: {
          crumbs: ['系统设置'],
          auth: ['visitor', '管理员']
        },
        component: () => import('@/views/SystemSettings.vue')
      }
    ]
  }
  // //编辑
  // {
  //   path: '/edit/:type',
  //   name: 'edit',
  //   meta: {
  //     auth: ['visitor']
  //   },
  //   component: () => import('../views/Edit')
  // },
  // //知识小册的编辑
  // {
  //   path: '/KnowledgeEdit/:id',

  //   name: 'KnowledgeEdit',
  //   meta: {
  //     auth: ['visitor']
  //   },
  //   component: () => import('../views/KnowledgeEdit')
  // },
  // //协同文章
  // {
  //   path: '/SynergyEdit',

  //   name: 'SynergyEdit',
  //   meta: {
  //     auth: ['visitor']
  //   },
  //   component: () => import('../views/SynergyEdit')
  // }
]
